home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / systems / mint / duftp / extras / slip.dip < prev   
Encoding:
Text File  |  1995-11-25  |  2.2 KB  |  121 lines

  1. #
  2. # Demon Dialup script
  3. #
  4. # Version:  @(#)sample.dip 1.40  07/20/93
  5. #
  6. # Author:   Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  7. #
  8.  
  9. main:
  10.   # First of all, set up our name for this connection.
  11.   # I am called "desklamp"
  12.   get $local 158.152.44.250
  13.  
  14.   # Next, set up the other side's name and address.
  15.   # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
  16.   get $remote 158.152.1.65
  17.   # Set netmask on sl0 to 255.255.255.0
  18.   netmask 255.255.255.0
  19.   # Set the desired serial port and speed.
  20.   port ttyb
  21.   #modem HAYES
  22.   speed 9600
  23.  
  24.   # Reset the modem and terminal line.
  25.   # This seems to cause trouble for some people!
  26.   #reset
  27.  
  28. # Note! "Standard" pre-defined "errlevel" values:
  29. #  0 - OK
  30. #  1 - CONNECT
  31. #  2 - ERROR
  32. #
  33. # You can change those grep'ping for "addchat()" in *.c...
  34.  
  35.   # Prepare for dialing.
  36.   send ATQ0V1E1X4\r
  37.   wait OK 10
  38.   #send AT0
  39.   #wait OK 2
  40.   if $errlvl != 0 goto modem_trouble
  41.   dial 99999999
  42.   sleep 15
  43.   if $errlvl != 1 goto modem_trouble
  44.  
  45.   # We are connected.  Login to the system.
  46. login:
  47.   sleep 2
  48.   wait ogin: 40
  49.   if $errlvl != 0 goto login_error
  50.   send username\n
  51.   wait ord: 20
  52.   if $errlvl != 0 goto password_error
  53.   send password\n
  54.   wait col: 30
  55.   if $errlvl != 0 goto no_protocol
  56.   print Doing protocol
  57.   send SLIP\n
  58. loggedin:
  59.  
  60.   # We are now logged in.
  61.   wait HELLO 15
  62.   if $errlvl != 0 goto prompt_error
  63.   print Way Hay!!!
  64.   # Set up the SLIP operating parameters.
  65.   get $mtu 296
  66.   # Ensure "route add -net default xs4all.hacktic.nl" will be done
  67.   print Doing routing
  68.   default
  69.  
  70.   # Say hello and fire up!
  71. done:
  72.   print CONNECTED $locip ---> $rmtip
  73.   mode SLIP
  74.   goto exit
  75.  
  76. no_protocol:
  77.   print Protocl Problem with sending to dmeon
  78.   goto error
  79.  
  80. prompt_error:
  81.   print TIME-OUT waiting for SLIPlogin to fire up...
  82.   goto error
  83.  
  84. login_trouble:
  85.   print Trouble waiting for the Login: prompt...
  86.   goto error
  87.  
  88. password:error:
  89.   print Trouble waiting for the Password: prompt...
  90.   goto error
  91.  
  92. modem_trouble:
  93.   print Trouble ocurred with the modem...
  94. error:
  95.   print CONNECT FAILED to $remote
  96.   quit
  97.  
  98. exit:
  99.   exit
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.